// 一级路由
import Home from "../pages/home/Home";

// 二级路由
import Test from '../pages/test'
import User from '../pages/user'
import Exam from '../pages/exam'
import Class from '../pages/class'
import Paper from '../pages/paper'

// 三级路由
import AddQuestions from '../pages/test/AddQuestions'
import QuestionsType from '../pages/test/QuestionsType'
import WatchQuestions from '../pages/test/WatchQuestions'

import AddUser from '../pages/user/AddUser'
import ShowUser from '../pages/user/ShowUser'

import AddExam from '../pages/exam/AddExam'
import ExamList from '../pages/exam/ExamList'

import Grade from '../pages/class/Grade'
import Room from '../pages/class/Room'
import Student from '../pages/class/Student'

import ClassList from '../pages/paper/Classlist'


// 三种身份   管理员   出题者   浏览者
export default [
    {
        path: "/home",
        com: Home,
        auth: ['管理员', '出题者', '浏览者'],
        children: [
            {
                path: "/home/test",
                auth: ['管理员', '出题者', '浏览者'],
                title: "试题管理",
                com: Test,
                children: [
                    {
                        path: "/home/test/AddQuestions",
                        com: AddQuestions,
                        auth: ['管理员', '出题者'],
                        title: "添加试题"
                    },
                    {
                        path: "/home/test/QuestionsType",
                        com: QuestionsType,
                        auth: ['管理员', '出题者'],
                        title: "试题分类"
                    },
                    {
                        path: "/home/test/WatchQuestions",
                        com: WatchQuestions,
                        auth: ['管理员', '出题者', '浏览者'],
                        title: "试题查看"
                    }
                ]
            },
            {
                path: "/home/user",
                auth: ['管理员', '出题者'],
                title: "用户管理",
                com: User,
                children: [
                    {
                        path: "/home/user/AddUser",
                        com: AddUser,
                        auth: ['管理员', '出题者'],
                        title: "添加用户"
                    },
                    {
                        path: "/home/user/ShowUser",
                        com: ShowUser,
                        auth: ['管理员'],
                        title: "用户展示"
                    },
                ]
            },
            {
                path: "/home/exam",
                auth: ['管理员'],
                title: "考试管理",
                com: Exam,
                children: [
                    {
                        path: "/home/exam/AddExam",
                        com: AddExam,
                        auth: ['管理员'],
                        title: "添加考试"
                    },
                    {
                        path: "/home/exam/ExamList",
                        com: ExamList,
                        auth: ['管理员'],
                        title: "试卷列表"
                    },
                ]
            },
            {
                path: "/home/class",
                auth: ['管理员', '出题者'],
                title: "班级管理",
                com: Class,
                children: [
                    {
                        path: "/home/class/Grade",
                        com: Grade,
                        auth: ['管理员', '出题者'],
                        title: "班级管理"
                    },
                    {
                        path: "/home/class/Room",
                        com: Room,
                        auth: ['管理员', '出题者'],
                        title: "教师管理"
                    },
                    {
                        path: "/home/class/Student",
                        com: Student,
                        auth: ['管理员', '出题者'],
                        title: "学生管理"
                    }
                ]
            },
            {
                path: "/home/paper",
                auth: ['管理员'],
                title: "阅卷管理",
                com: Paper,
                children: [
                    {
                        path: "/home/paper/ClassList",
                        com: ClassList,
                        auth: ['管理员'],
                        title: "待批班级"
                    }
                ]
            }
        ]
    }
]